package org.kgc.alanhealth.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName hospital_drugs
 */
@Data
public class HospitalDrugs implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 药品ID
     */
    private Integer drugsid;

    /**
     * 
     */
    private String drugs;

    /**
     * 药品价格
     */
    private Double drugprice;

    /**
     * 
     */
    private String picture;

    /**
     * 药品规格
     */
    private String consumption;

    /**
     * 适应症
     */
    private String indication;

    /**
     * 用法用量
     */
    private String metering;

    /**
     * 主要成分
     */
    private String component;

    /**
     * 用药禁忌
     */
    private String taboo;

    /**
     * 不良反应
     */
    private String reaction;

    /**
     * 药物相互作用
     */
    private String effect;

    /**
     * 注意事项
     */
    private String matter;

    /**
     * 药理毒性
     */
    private String toxicity;

    /**
     * 药物品牌
     */
    private String brand;

    /**
     * 药品类型
     */
    private String type;

    /**
     * 药品计量
     */
    private String dose;

    /**
     * 药物性状
     */
    private String character;

    /**
     * 药物存储
     */
    private String storage;

    /**
     * 药品保质期
     */
    private String period;

    /**
     * 批准文号
     */
    private String approval;

    /**
     * 生产厂家
     */
    private String manufactor;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HospitalDrugs other = (HospitalDrugs) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDrugsid() == null ? other.getDrugsid() == null : this.getDrugsid().equals(other.getDrugsid()))
            && (this.getDrugs() == null ? other.getDrugs() == null : this.getDrugs().equals(other.getDrugs()))
            && (this.getDrugprice() == null ? other.getDrugprice() == null : this.getDrugprice().equals(other.getDrugprice()))
            && (this.getPicture() == null ? other.getPicture() == null : this.getPicture().equals(other.getPicture()))
            && (this.getConsumption() == null ? other.getConsumption() == null : this.getConsumption().equals(other.getConsumption()))
            && (this.getIndication() == null ? other.getIndication() == null : this.getIndication().equals(other.getIndication()))
            && (this.getMetering() == null ? other.getMetering() == null : this.getMetering().equals(other.getMetering()))
            && (this.getComponent() == null ? other.getComponent() == null : this.getComponent().equals(other.getComponent()))
            && (this.getTaboo() == null ? other.getTaboo() == null : this.getTaboo().equals(other.getTaboo()))
            && (this.getReaction() == null ? other.getReaction() == null : this.getReaction().equals(other.getReaction()))
            && (this.getEffect() == null ? other.getEffect() == null : this.getEffect().equals(other.getEffect()))
            && (this.getMatter() == null ? other.getMatter() == null : this.getMatter().equals(other.getMatter()))
            && (this.getToxicity() == null ? other.getToxicity() == null : this.getToxicity().equals(other.getToxicity()))
            && (this.getBrand() == null ? other.getBrand() == null : this.getBrand().equals(other.getBrand()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getDose() == null ? other.getDose() == null : this.getDose().equals(other.getDose()))
            && (this.getCharacter() == null ? other.getCharacter() == null : this.getCharacter().equals(other.getCharacter()))
            && (this.getStorage() == null ? other.getStorage() == null : this.getStorage().equals(other.getStorage()))
            && (this.getPeriod() == null ? other.getPeriod() == null : this.getPeriod().equals(other.getPeriod()))
            && (this.getApproval() == null ? other.getApproval() == null : this.getApproval().equals(other.getApproval()))
            && (this.getManufactor() == null ? other.getManufactor() == null : this.getManufactor().equals(other.getManufactor()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDrugsid() == null) ? 0 : getDrugsid().hashCode());
        result = prime * result + ((getDrugs() == null) ? 0 : getDrugs().hashCode());
        result = prime * result + ((getDrugprice() == null) ? 0 : getDrugprice().hashCode());
        result = prime * result + ((getPicture() == null) ? 0 : getPicture().hashCode());
        result = prime * result + ((getConsumption() == null) ? 0 : getConsumption().hashCode());
        result = prime * result + ((getIndication() == null) ? 0 : getIndication().hashCode());
        result = prime * result + ((getMetering() == null) ? 0 : getMetering().hashCode());
        result = prime * result + ((getComponent() == null) ? 0 : getComponent().hashCode());
        result = prime * result + ((getTaboo() == null) ? 0 : getTaboo().hashCode());
        result = prime * result + ((getReaction() == null) ? 0 : getReaction().hashCode());
        result = prime * result + ((getEffect() == null) ? 0 : getEffect().hashCode());
        result = prime * result + ((getMatter() == null) ? 0 : getMatter().hashCode());
        result = prime * result + ((getToxicity() == null) ? 0 : getToxicity().hashCode());
        result = prime * result + ((getBrand() == null) ? 0 : getBrand().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getDose() == null) ? 0 : getDose().hashCode());
        result = prime * result + ((getCharacter() == null) ? 0 : getCharacter().hashCode());
        result = prime * result + ((getStorage() == null) ? 0 : getStorage().hashCode());
        result = prime * result + ((getPeriod() == null) ? 0 : getPeriod().hashCode());
        result = prime * result + ((getApproval() == null) ? 0 : getApproval().hashCode());
        result = prime * result + ((getManufactor() == null) ? 0 : getManufactor().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", drugsid=").append(drugsid);
        sb.append(", drugs=").append(drugs);
        sb.append(", drugprice=").append(drugprice);
        sb.append(", picture=").append(picture);
        sb.append(", consumption=").append(consumption);
        sb.append(", indication=").append(indication);
        sb.append(", metering=").append(metering);
        sb.append(", component=").append(component);
        sb.append(", taboo=").append(taboo);
        sb.append(", reaction=").append(reaction);
        sb.append(", effect=").append(effect);
        sb.append(", matter=").append(matter);
        sb.append(", toxicity=").append(toxicity);
        sb.append(", brand=").append(brand);
        sb.append(", type=").append(type);
        sb.append(", dose=").append(dose);
        sb.append(", character=").append(character);
        sb.append(", storage=").append(storage);
        sb.append(", period=").append(period);
        sb.append(", approval=").append(approval);
        sb.append(", manufactor=").append(manufactor);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}